06. More Advanced Features of JUnit

More Advanced Features of JUnit heading

More Advanced Features of JUnit

ND035 C04 L02 A09.1 How To Write A Junit, Example-

Link to junit official site

As we just saw in the video, you can check out this page for a comprehensive list of all of the methods that the JUnits Assert class contains.

Using @Before, BeforeClass, @After, @AfterClass and @Ignore

ND035 C04 L02 A09.2 How To Write A Junit, Example-

JUnit lifecycle test

QUIZ QUESTION::

Here are some Junit annotations. See if you can match each one with its purpose.

ANSWER CHOICES:



Purpose

Annotation

@After

@BeforeClass

@Before

@AfterClass

SOLUTION:

Purpose

Annotation

@After

@BeforeClass

@Before

@AfterClass

Parameterized tests heading

Parameterized tests

ND035 C04 L02 A09.3 How To Write A Junit, Example-

Parameterized Test Quiz

Parameterized Tests allow you to do what?

SOLUTION: Run the same test with different parameters

Annotations from JUnits suites heading

Annotations from JUnit suites

ND035 C04 L02 A09.4 How To Write A Junit, Example-